package com.xzlf.controller;

import com.xzlf.config.JobTaskConfig;
import com.xzlf.domain.JobTask;
import com.xzlf.service.JobTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class DemoController {

    @Autowired
    private JobTaskService jobTaskService;


    @GetMapping("/update")
    public String updateCron(JobTask jobTask){
        jobTaskService.updateCron(jobTask);
        return "ok";
    }
}
